<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        function Person (name, arg2) {
            this.name = name;
            this.magAge = 100;
            this.magA11 = arg2;
            this.head = 1;
            this.say = function() {
                console.log('这个以后用不用？');
            }
        }

        function ZzRen(food) {
            this.heSuan = 48;
            this.eat = food;
            // call和apply都修改this指向，由父类的实例改为指向子类的实例
            // Person.call(this, 'bwf', '555')
            Person.apply(this, ['吃瓜小星', 888])
        }

        // 郑州1号
        var zz1 = new ZzRen('hlt');
        console.log(zz1);
    </script>
</body>
</html>